To achieve high compression efficiency, image and video coding schemes usually employ prediction and transform to leverage spatial and temporal redundancy in the video content. Generally, intra or inter prediction is used to exploit the intra or inter frame correlation, then the differences between the original image and the predicted image, often denoted as prediction errors or prediction residuals, are transformed, quantized and entropy coded. To reconstruct the video, the compressed data is decoded by inverse processes corresponding to the prediction, transform, quantization and entropy coding.
During various operations in a video compression system, the video data may exceed the data range used to represent the video data. To avoid possible data inversion, for example, a high value exceeding the range of an 8-bit representation may be inadvertently treated as a low value if only the lower eight bits are retained, the video data is usually clipped to a proper range.